//
// Created by yyancy on 2019/10/31.
//
#include <netinet/in.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <string.h>
#include<sys/types.h>
#include "udp.c"

#define SA struct sockaddr *

int server() {
    struct sockaddr_in server_sock;
    struct sockaddr_in client_sock;
    int server_fd;
    int client_fd;
    socklen_t clien_sock_len;
    char buf[100];
    char *mes = "hello,world";

    server_sock.sin_family = PF_INET;
    /*server_sock.sin_addr.s_addr = htonl(INADDR_ANY);*/
    server_sock.sin_addr.s_addr = inet_addr("127.0.0.1");
    server_sock.sin_port = htons(8080);

    server_fd = Socket(AF_INET, SOCK_RAW, IPPROTO_ICMP);
    setuid(getuid()); 
    /*Listen(server_fd, 4);*/

    struct icmp *icmp;
    icmp->icmp_type = ICMP_ECHO; 


    close(client_fd);
    close(server_fd);

    return 0;
}

int main() {
    server();
    return 0;
}
